#include <iostream>

class Test
{
    public:
    Test()
    {
        std::cout<<"构造函数"<<std::endl;

    }

    ~Test()
    {
        std::cout<<"析构函数"<<std::endl;
    }
};

int main()
{
    Test *t = new Test();
    Test *t2 = new Test[3];

    std::cout<<"--------\n";
    Test *t1 = (Test *)malloc(sizeof(Test));
    
    delete t;
    delete[]t2;
    free(t1);
}